<!DOCTYPE html>
<html>
<head>
    <title>首页 {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <hook name="before_head_end"/>
</head>
<body class="page-index">
<div class="container">
    <include file="public@nav"/>

    <div class="contents">
        <!--活动通知/公告-->
        <div class="activity" style="width: 100%">
            <div class="title">
                <ul class="news-title">
                    <li class="title-item active"><a href="javascript:;">活动展示</a></li>
                    <li class="title-item"><a href="javascript:;">活动预告</a></li>
                </ul>
            </div>
            <div class="box-cont">
                <div class="act-forenotice">
                    <div class="notice">

                        <foreach name="act_show" id="vo">
                            <div class="blockSty">
                                <a href="{:url('portal/Activity/act_show',['id'=>$vo.id])}">
                                    <div>
                                        <img src="/html/img/list.png" class="listImg">
                                        <div class="blockTitle">{$vo.title} 活动展示</div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div class="timeAdd">
                                        <i class="layui-icon layui-icon-log"></i> {$vo.end_date|date="Y-m-d H:i"}
                                        <text class="jgSty"></text>
                                        <i class="layui-icon layui-icon-location"></i> {$vo.place|json_decode|array_first}
                                    </div>
                                </a>
                            </div>
                        </foreach>


                    </div>
                    <ul class="pagination">{$page_adv}</ul>
                </div>
                <div class="act-forenotice hidden">
                    <div class="notice">

                        <foreach name="act_adv" id="vo">
                            <div class="blockSty">
                                <a href="{:url('portal/Activity/act_adv',['id'=>$vo.id])}">
                                    <div>
                                        <img src="/html/img/list.png" class="listImg">
                                        <div class="blockTitle">{$vo.title} 活动预告</div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div class="timeAdd">
                                        <i class="layui-icon layui-icon-log"></i> {$vo.end_time|date="Y-m-d H:i"}
                                        <text class="jgSty"></text>
                                        <i class="layui-icon layui-icon-location"></i>  {$vo.place|json_decode|array_first}
                                    </div>
                                </a>
                            </div>
                        </foreach>


                    </div>
                    <ul class="pagination">{$page_adv}</ul>
                </div>
            </div>
        </div>

        <div style="clear: both;"></div>
    </div>


    <include file="public@footer"/>
    <!-- /container -->
    <include file="public@scripts"/>
    <script>
        (function($){
            "use strict";
            function bind_events(){
                $('.title .title-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.activity .box-cont .act-forenotice').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                });
                $('.tab-ctrl-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.rank .tab-pannel div').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                });
            }
            $(function(){
                bind_events();
                $('.hdtj ul li:last').css("border","none");
            })
        })(jQuery);

        //    layui
        layui.use(['laypage', 'layer'], function() {
            var laypage = layui.laypage
                    , layer = layui.layer;
//        分页
            laypage.render({
                elem: 'listOne'
                ,count: 100
                ,layout: ['prev', 'page', 'next', 'skip' ,'count']
                ,prev: '<em>←</em>'
                ,next: '<em>→</em>'
                ,jump: function(obj){
                    console.log(obj)
                }
            });
            laypage.render({
                elem: 'listTwo'
                ,count: 100
                ,layout: ['prev', 'page', 'next', 'skip' ,'count']
                ,prev: '<em>←</em>'
                ,next: '<em>→</em>'
                ,jump: function(obj){
                    console.log(obj)
                }
            });
        });
    </script>
    <hook name="before_body_end"/>
</body>
</html>
